package com.hfaccp;

import java.util.Scanner;

public class ExeptionText {

	public static void main(String[] args) {
		
		Scanner input=new Scanner(System.in);
		try {
		System.out.println("请输入被除数：");
		
		int dividend=input.nextInt();
		System.out.println("请输入除数：");
		int divisor=input.nextInt();
		int result=dividend/divisor;
		System.out.println("计算结果为："+result);
	}
	catch(Exception ex) {
		//System.out.println("被除数和除数必须是整数，除数不能为零！");
	
	ex.printStackTrace();
	}
		finally {
			
		}
		System.out.println("感谢使用本程序！");
	}

}
